package pojo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

public class CheckInRecord {
    private int check_in_id;
    private int stuId;
    private int dormId;
    private int bedId;
    private Date cherk_in_time;
    private Date plan_cherk_out_time;
    private BigDecimal payment;
    private BigDecimal actual_payment;
    private boolean isTakenKey;
    private BigDecimal payedCash;

    public CheckInRecord() {
    }

    public CheckInRecord(int check_in_id, int stuId, int dormId, int bedId, Date cherk_in_time, Date plan_cherk_out_time, BigDecimal payment, BigDecimal actual_payment, boolean isTakenKey, BigDecimal payedCash) {
        this.check_in_id = check_in_id;
        this.stuId = stuId;
        this.dormId = dormId;
        this.bedId = bedId;
        this.cherk_in_time = cherk_in_time;
        this.plan_cherk_out_time = plan_cherk_out_time;
        this.payment = payment;
        this.actual_payment = actual_payment;
        this.isTakenKey = isTakenKey;
        this.payedCash = payedCash;
    }

    public int getCheck_in_id() {
        return check_in_id;
    }

    public void setCheck_in_id(int check_in_id) {
        this.check_in_id = check_in_id;
    }

    public int getStuId() {
        return stuId;
    }

    public void setStuId(int stuId) {
        this.stuId = stuId;
    }

    public int getDormId() {
        return dormId;
    }

    public void setDormId(int dormId) {
        this.dormId = dormId;
    }

    public int getBedId() {
        return bedId;
    }

    public void setBedId(int bedId) {
        this.bedId = bedId;
    }

    public Date getCherk_in_time() {
        return cherk_in_time;
    }

    public void setCherk_in_time(Date cherk_in_time) {
        this.cherk_in_time = cherk_in_time;
    }

    public Date getPlan_cherk_out_time() {
        return plan_cherk_out_time;
    }

    public void setPlan_cherk_out_time(Date plan_cherk_out_time) {
        this.plan_cherk_out_time = plan_cherk_out_time;
    }

    public BigDecimal getPayment() {
        return payment;
    }

    public void setPayment(BigDecimal payment) {
        this.payment = payment;
    }

    public BigDecimal getActual_payment() {
        return actual_payment;
    }

    public void setActual_payment(BigDecimal actual_payment) {
        this.actual_payment = actual_payment;
    }

    public boolean isTakenKey() {
        return isTakenKey;
    }

    public void setTakenKey(boolean takenKey) {
        isTakenKey = takenKey;
    }

    public BigDecimal getPayedCash() {
        return payedCash;
    }

    public void setPayedCash(BigDecimal payedCash) {
        this.payedCash = payedCash;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CheckInRecord that = (CheckInRecord) o;
        return isTakenKey == that.isTakenKey &&
                Objects.equals(stuId, that.stuId) &&
                Objects.equals(dormId, that.dormId) &&
                Objects.equals(bedId, that.bedId) &&
                Objects.equals(cherk_in_time, that.cherk_in_time) &&
                Objects.equals(plan_cherk_out_time, that.plan_cherk_out_time) &&
                Objects.equals(payment, that.payment) &&
                Objects.equals(actual_payment, that.actual_payment) &&
                Objects.equals(payedCash, that.payedCash);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stuId, dormId, bedId, cherk_in_time, plan_cherk_out_time, payment, actual_payment, isTakenKey, payedCash);
    }

    @Override
    public String toString() {
        return "CheckInRecord{" +
                "check_in_id=" + check_in_id +
                ", stuId=" + stuId +
                ", dormId=" + dormId +
                ", bedId=" + bedId +
                ", cherk_in_time=" + cherk_in_time +
                ", plan_cherk_out_time=" + plan_cherk_out_time +
                ", payment=" + payment +
                ", actual_payment=" + actual_payment +
                ", isTakenKey=" + isTakenKey +
                ", payedCash=" + payedCash +
                '}';
    }
}
